package co.yixiang.retail.biz.order.controller;



import co.yixiang.common.log.annotation.Log;
import co.yixiang.retail.biz.order.service.YxExpressService;
import co.yixiang.retail.common.dto.YxExpressQueryCriteria;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "商城:快递管理")
@RestController
@RequestMapping
public class YxExpressController {

    private  final YxExpressService yxExpressService;


    public  YxExpressController(YxExpressService yxExpressService){
        this.yxExpressService=yxExpressService;
    }

    @Log("查询快递")
    @ApiOperation(value = "查询快递")
    @GetMapping(value = "/yxExpress")
    public ResponseEntity getYxExpresss(YxExpressQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(yxExpressService.queryAll(criteria,pageable), HttpStatus.OK);
    }
}
